{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% import "_macros.html" as macros %}

{% block title %}HOME{% endblock %}

{% block page_content %}
<div class="page-header">
<h1>你好，{% if current_user.is_authenticated %}{{ current_user.username }}{% else %}游客{% endif %}</h1>
</div>
    <div>
    {% if current_user.can(Permission.WRITE) %}
    {{ wtf.quick_form(form) }}
    {% endif %}
    </div>
    <div class="post-tabs">
    <ul class="nav nav-tabs">
        <li {% if not show_followed %} class="active"{% endif %}><a href="{{ url_for('.show_all') }}">所有</a></li>
        <li {% if show_followed %} class="active" {% endif %}><a href="{{ url_for('.show_followed') }}">关注</a></li>
    </ul>
    {% include '_posts.html' %}
    </div>
    {% if pagination %}
    <div class="pagination">
    {{ macros.pagination_widget(pagination, '.index') }}
    </div>
    {% endif %}

<p>当地时间为：{{ moment(current_time).format('LLLL') }}.</p>
<p>更新于{{ moment(current_time).fromNow(refresh=True) }}.</p>
<p>管理员邮箱：<span class="label label-default">1299397424@qq.com</span></p>

{% endblock %}
{% block scripts %}
        {{ super() }}
        {{ pagedown.include_pagedown() }}
    {% endblock %}
